package com.unicom.microservice.peixun.peixun_demo1.web;

import com.unicom.microservice.peixun.peixun_demo1.domain.Customer;
import com.unicom.microservice.peixun.peixun_demo1.domain.User;
import com.unicom.microservice.peixun.peixun_demo1.domain.UserAndCustomerVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;



/**
 @author xuwenyuan
 @date 2019-11-08
 @desc 写一个hello接口
 方法类型：  GET
 接口路径：/{组名}/{学号}/hello
 接口返回：任意字符串，如"Hello  World"
 */

@RestController
@ApiIgnore
@RequestMapping(value = "/pxryy3/38066/")
public class HelloController {

    @RequestMapping(value = "hello",method = RequestMethod.GET)
    public String sayHello(){
        return "Hello World";
    }

    @RequestMapping(value = "uservo",method = RequestMethod.GET)
    public User getSomeInfo(){
        User user = new User();
        user.setAge(18);
        user.setName("zhansan");
        user.setEmail("zhansan@qq.com");
        user.setId(123456L);
        Customer customer = new Customer();
        customer.setName("张三");
        customer.setMoney("80000");
        user.setCustomer(customer);
        return user;
    }





}
